<div class="wrapper-md bg-light b-b">
    <h1 class="m-n font-thin h3">用户管理</h1>
</div>
<div class="hbox hbox-auto-xs hbox-auto-sm" ng-controller="UserCtrl">
    <div class="panel panel-default">
        <div class="panel-body">
            <form role="form" class="form-inline" ng-submit="search()">
                <label class="control-label">登录名</label>
                <input class="form-control" ng-model="form.phone" maxlength="11" />
                <button type="submit" class="btn btn-success"><i class="fa fa-search"></i> 查询</button>
            </form>
            <div class="row  m-md scroll">
                <table class="table table-striped m-b-none dataTable no-footer table-hover">
                    <tr>
                        <th>序号</th>
                        <th>登录名</th>
                        <th>手机号</th>
                        <th>昵称</th>
                        <th>是否锁定</th>
                        <th>注册时间</th>
                        <th></th>
                    </tr>
                    <tr ng-repeat="user in userList track by user.Id">
                        <td>{{$index+1}}</td>
                        <td>{{::user.UserName}}</td>
                        <td>{{::user.Phone}}</td>
                        <td>{{::user.Nickname}}</td>
                        <td>{{user.LockoutEnabled?'是':'否'}}</td>
                        <td>{{::user.RegisterTime|date:'yyyy-MM-dd HH:mm'}}</td>
                        <td>
                            <button class="btn btn-sm btn-rounded btn-icon btn-info" ng-click="lockToggle(user)" tooltip="修改锁定状态"><i class="fa" ng-class="{'fa-lock':!user.LockoutEnabled,'fa-unlock':user.LockoutEnabled}"></i></button>
                            <button class="btn btn-sm btn-rounded btn-icon btn-danger" ng-click="setRole(user.Id)" tooltip="授权"><i class="fa fa-key"></i></button>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="row">
                <div class="col-md-10">
                    <pagination total-items="page.total" ng-model="page.index" max-size="5" items-per-page="page.size" previous-text="上一页" next-text="下一页"
                        first-text="首页" last-text="末页" class="pagination-sm pull-right m-n" boundary-links="true"></pagination>
                </div>
                <div class="col-md-2">
                    每页
                    <select ng-model="page.size" class="form-control w-xs" style="display: inline-block" ng-options="s for s in [10,20,50]">
                </select> 行
                </div>
            </div>
        </div>
    </div>
</div>